import { Module, forwardRef } from '@nestjs/common';
import { SingerService } from './singer.service';
import { SingerController } from './singer.controller';
import { CommonModule } from '../../common/common.module';
import { AuthModule } from '../../core/auth/auth.module';
import { Singer } from '../../entities/singer.entity';
import { PassportModule } from '@nestjs/passport';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Poll } from '@/entities/poll.entity';

@Module({
  imports: [
    TypeOrmModule.forFeature([Singer, Poll]),
    forwardRef(() => AuthModule), // 处理相互循环依赖
    CommonModule,
    PassportModule,
  ],
  controllers: [SingerController],
  providers: [SingerService],
})
export class SingerModule {}
